[client] add inbox dtos - #63
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
|
Warning Review limit reached
Next review available in: 40 minutes Limit details: You’ve used all 1 included review currently available under your plan. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds mobile inbox request payloads, extends inbox responses with encryption and MMS attachment data, adds reusable listing options, restores inbox-specific filters, updates related tests, and adds the ChangesInbox API
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
217caab to
b993582
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
smsgateway/dto_inbox.go (1)
35-36: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winCover the new response fields in a client test.
TestClient_ListInboxMessagesonly checks the message count. IncludeisEncryptedand one attachment in the mock JSON, then assertInboxMessage.IsEncryptedand allInboxAttachmentfields.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@smsgateway/dto_inbox.go` around lines 35 - 36, Update TestClient_ListInboxMessages to include isEncrypted and one attachment in the mock inbox response, then assert InboxMessage.IsEncrypted and every field on the decoded InboxAttachment, while retaining the existing message-count assertion.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@smsgateway/dto_inbox.go`:
- Around line 7-15: The v1 API removes the exported IncomingMessageType*,
IncomingMessage, and IncomingAttachment symbols without compatibility aliases.
Preserve existing imports by adding deprecated aliases for each removed symbol
alongside InboxMessageType and the related message/attachment types, unless this
release is explicitly intended to be breaking v1.
---
Nitpick comments:
In `@smsgateway/dto_inbox.go`:
- Around line 35-36: Update TestClient_ListInboxMessages to include isEncrypted
and one attachment in the mock inbox response, then assert
InboxMessage.IsEncrypted and every field on the decoded InboxAttachment, while
retaining the existing message-count assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5c8b42bd-3a2d-4904-986d-14f334f01fe0
📒 Files selected for processing (7)
smsgateway/client.gosmsgateway/client_test.gosmsgateway/dto_inbox.gosmsgateway/requests_3rdparty.gosmsgateway/requests_3rdparty_test.gosmsgateway/requests_inbox.gosmsgateway/requests_mobile.go
🚧 Files skipped from review as they are similar to previous changes (1)
- smsgateway/requests_mobile.go
b993582 to
b7355e5
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
smsgateway/dto_inbox.go (1)
28-38: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winCover the new JSON fields in the client test.
The existing test at
smsgateway/client_test.go(Lines 1052-1173) does not sendisEncryptedorattachments. Add a fixture with both fields and assertIncomingMessage.IsEncryptedandIncomingMessage.AttachmentsafterListInboxMessages. This protects the new JSON tags and field types.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@smsgateway/dto_inbox.go` around lines 28 - 38, Update the client test covering ListInboxMessages in smsgateway/client_test.go to include isEncrypted and attachments in the fixture response, then assert the decoded IncomingMessage.IsEncrypted and IncomingMessage.Attachments values. Preserve the existing inbox message assertions while covering both new JSON fields and their types.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@smsgateway/dto_inbox.go`:
- Around line 28-38: Update the client test covering ListInboxMessages in
smsgateway/client_test.go to include isEncrypted and attachments in the fixture
response, then assert the decoded IncomingMessage.IsEncrypted and
IncomingMessage.Attachments values. Preserve the existing inbox message
assertions while covering both new JSON fields and their types.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 24ce504d-0e01-4170-a002-10d3ce9c872e
📒 Files selected for processing (4)
smsgateway/client.gosmsgateway/domain_auth.gosmsgateway/dto_inbox.gosmsgateway/requests_mobile.go
🚧 Files skipped from review as they are similar to previous changes (2)
- smsgateway/domain_auth.go
- smsgateway/requests_mobile.go
79bbc01 to
3ac93d1
Compare
3ac93d1 to
ca8711d
Compare
Summary by CodeRabbit
inbox:readpermission scope for accessing inbox messages.